

clear
use "Turning Discontent into Votes Parties data" 

global country "country_name"
global year "year"

global control_party "size excluded pec other_ethnic"

global control_country "ln_gdp polity eth_frac east pr pres fed"







reg ethno_diff bgi_diff $control_party $control_country, robust
outreg2 using Table1.doc, replace dec(3) 


reg cul_diff bgi_diff  $control_party $control_country, robust
outreg2 using Table1.doc, append dec(3) 



reg ter_diff bgi_diff $control_party $control_country, robust
outreg2 using Table1.doc, append dec(3) 




twoway scatter ethno_diff bgi_diff, schem(lean1) msymbol(circle) aspect(1) msize(vsmall) saving(c, replace) yscale(r(-4 4))

scatter ter_diff bgi_diff, schem(lean1) msymbol(circle) msize(vsmall)  aspect(1)  saving(a, replace)

scatter cul_diff bgi_diff, schem(lean1) msymbol(circle) msize(vsmall)   aspect(1) saving(b, replace)



gr combine a.gph b.gph c.gph, row(3)





//Appendix


//Non-Salient parties 

reg ethno_diff bgi_diff $control_party $control_country if ethno_m_17>1.61, robust
outreg2 using App1.doc, replace dec(3) 

reg cul_diff bgi_diff  $control_party $control_country if cul_m_17>4.6, robust
outreg2 using App1.doc, append dec(3) 

reg ter_diff bgi_diff $control_party $control_country if ter_m_17>2.34, robust
outreg2 using App1.doc, append dec(3) 


//Non-ethnically relevent coutries

reg ethno_diff bgi_diff $control_party $control_country if country_id!=31 & country_id!=32 & country_id !=51, robust
outreg2 using App2.doc, replace dec(3) 

reg cul_diff bgi_diff  $control_party $control_country if country_id!=31 & country_id!=32 & country_id !=51, robust
outreg2 using App2.doc, append dec(3) 

reg ter_diff bgi_diff $control_party $control_country if country_id!=31 & country_id!=32 & country_id !=51, robust
outreg2 using App2.doc, append dec(3) 


//LOW ELF if eth_frac<.8


reg ethno_diff bgi_diff $control_party $control_country if eth_frac<.8, robust
outreg2 using App3.doc, replace dec(3) 

reg cul_diff bgi_diff  $control_party $control_country if eth_frac<.8, robust
outreg2 using App3.doc, append dec(3) 

reg ter_diff bgi_diff $control_party $control_country if eth_frac<.8, robust
outreg2 using App3.doc, append dec(3) 


